home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / rbbs_pc / opendoor.zip / OPENDOOR.BAS < prev    next >
BASIC Source File  |  1989-01-25  |  19KB  |  605 lines

  1. REM  OPENDOOR Release 1.0 on 1-1-89 by Fast Fingers ... 313-247-0094
  2.  
  3. DECLARE SUB HitKey ()
  4. DECLARE SUB HelpUser ()
  5. DECLARE SUB ReadCommandLine (Command1$, Command2$, Drive$, Path$, Code$)
  6. DECLARE SUB Delay (Seconds!)
  7. DECLARE SUB ReadDEF (BBSName$, SysopFName$, SysopLName$, Port$, BBS$, MaxTime$, Debug$)
  8. DECLARE SUB Filter (Name$)
  9. DECLARE SUB RBBSBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag!)
  10. DECLARE SUB PcBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag!)
  11. DECLARE SUB FindFile (File$, FindSW!)
  12.     
  13.      TYPE PcBoardRecord
  14.        PcDummy1 AS STRING * 10
  15.        PcBaud AS STRING * 4
  16.        PcName AS STRING * 27
  17.        PcFirstName AS STRING * 15
  18.        PcGraphicsSw AS STRING * 2
  19.        PcDummy2 AS STRING * 71
  20.      END TYPE
  21.     
  22.      IF COMMAND$ = "" THEN CALL HelpUser
  23.  
  24.      CLS
  25.      PRINT "***********************************************"
  26.      PRINT "*    OPENDOOR.EXE                     1/1/89  *"
  27.      PRINT "* Fast Finger's Generic Ansi Graphics Utility *"
  28.      PRINT "* To Open Doors for BBS Systems that output   *"
  29.      PRINT "* PcBoard.Sys or DorInfo1.Def.  Release 1.0   *"
  30.      PRINT "***********************************************"
  31.      PRINT
  32.      CALL ReadCommandLine(Command1$, Command2$, Drive$, Path$, Code$)
  33.      PRINT
  34.      CALL ReadDEF(BBSName$, SysopFName$, SysopLName$, Port$, BBS$, MaxTime$, Debug$)
  35.      PRINT
  36.      IF Debug$ = "ON" THEN CALL Delay(5)
  37.      IF Command2$ = "LOCAL" THEN Port$ = "LOCAL"
  38.  
  39.      IF BBS$ = "PCBOARD.SYS" THEN
  40.          CALL PcBoard(BBS$, UFName$, ULName$, UTime$, HookUp$, OkFlag)
  41.          IF OkFlag THEN GOTO ChkHookUp
  42.        END IF
  43.      IF BBS$ = "DORINFO1.DEF" THEN
  44.          CALL RBBSBoard(BBS$, UFName$, ULName$, UTime$, HookUp$, OkFlag)
  45.          IF OkFlag THEN GOTO ChkHookUp
  46.        END IF
  47.  
  48.      PRINT "Sorry, but this release of  OPENDOOR.EXE does not yet support"
  49.      PRINT "the BBS door output you requested, => " + BBS$ + " in the"
  50.      PRINT "file named  OPENDOOR.DEF     *** ABORTING DOOR REQUEST *** "
  51.      CALL Delay(5)
  52.      END
  53.    
  54. ChkHookUp:
  55.     
  56.      IF HookUp$ = "LOCAL" THEN GOTO StartOutput
  57.      IF Port$ = "LOCAL" THEN HookUp$ = "LOCAL": GOTO StartOutput
  58.      HookUp$ = Port$ + HookUp$
  59.     
  60. StartOutput:
  61.     
  62.      IF VAL(UTime$) = 0 THEN UTime$ = MaxTime$
  63.      IF VAL(UTime$) > VAL(MaxTime$) THEN UTime$ = MaxTime$
  64.     
  65.      OutputFile$ = Path$ + "\" + "OPENDOOR.Sys"
  66.      FileId = FREEFILE
  67.  
  68.      OPEN OutputFile$ FOR OUTPUT AS #FileId
  69.        PRINT #FileId, BBSName$
  70.        PRINT #FileId, SysopFName$
  71.        PRINT #FileId, SysopLName$
  72.        PRINT #FileId, HookUp$
  73.        PRINT #FileId, UFName$
  74.        PRINT #FileId, ULName$
  75.        PRINT #FileId, UTime$
  76.        PRINT #FileId, Debug$
  77.      CLOSE #FileId
  78.      
  79.      IF Debug$ = "ON" THEN CALL Delay(5)
  80.      PRINT
  81.      PRINT "Data being Written into OPENDOOR.SYS"
  82.      PRINT
  83.      PRINT BBSName$
  84.      PRINT SysopFName$
  85.      PRINT SysopLName$
  86.      PRINT HookUp$
  87.      PRINT UFName$
  88.      PRINT ULName$
  89.      PRINT UTime$
  90.      PRINT Debug$
  91.      IF Debug$ = "ON" THEN CALL Delay(5)
  92.  
  93. StartDoor:
  94.  
  95.      SHELL Drive$
  96.      CHDIR Path$
  97.      RUN Code$: REM TURN OFF DURING DEVELOPMENT ****************************
  98.     
  99.      END
  100.  
  101. SUB Delay (Seconds)
  102.  
  103.   Time1! = TIMER
  104.   Time2! = Time1!
  105.  
  106. ChkWaitTime:
  107.  
  108.   Time2! = TIMER
  109.   WaitTime! = ABS(Time2! - Time1!)
  110.   IF WaitTime! >= Seconds THEN EXIT SUB
  111.   GOTO ChkWaitTime
  112.  
  113. END SUB
  114.  
  115. SUB Filter (Name$)
  116.  
  117.   A$ = UCASE$(Name$)
  118.   x = LEN(A$)
  119.   IF x < 1 THEN EXIT SUB
  120.  
  121.   FOR i = 1 TO x
  122.     B$ = MID$(A$, i, 1)
  123.     y = ASC(B$)
  124.     IF y < 65 OR y > 90 THEN MID$(Name$, i, 1) = "-"
  125.   NEXT i
  126.  
  127. END SUB
  128.  
  129. SUB FindFile (File$, FindSW)
  130.  
  131. '
  132. ' Input ...... File$ <= Path\Name of file to find
  133. ' Output ..... 1 = File Found
  134. '              0 = File Not Found
  135. '
  136.   FileId = FREEFILE
  137.   OPEN File$ FOR RANDOM AS #FileId LEN = 10
  138.   IF LOF(FileId) < 1 THEN FindSW = 0 ELSE FindSW = 1
  139.   CLOSE #FileId
  140.   IF FindSW = 0 THEN KILL File$
  141. '
  142. END SUB
  143.  
  144. SUB HelpUser
  145.  
  146.  CLS
  147.  Temp$ = " OPENDOOR " + COMMAND$
  148.  PRINT Temp$
  149.  
  150.  PRINT
  151.  PRINT "This BBS Door utility was written by Fast Fingers, the sysop of the"
  152.  PRINT "Tool Box BBS.  Its purpose is to allow the Ansi Graphics doors I   "
  153.  PRINT "have written to be easily interfaced with various BBS systems which"
  154.  PRINT "each have their own way of sending information critical to a door's"
  155.  PRINT "operation.  This is release 1.0 and the latest version can be found"
  156.  PRINT "at my bbs 313-247-0094 @ 2400 baud.                                            "
  157.  PRINT
  158.  PRINT "Input comes from a text file you should create named  OPENDOOR.DEF  "
  159.  PRINT "and the command line that calls this program.  Output is placed in "
  160.  PRINT "the same directory as the door being called and is another text file"
  161.  PRINT "called  OPENDOOR.SYS  This program will switch to the door's drive  "
  162.  PRINT "and directory and then call the door.  This program and it's DEF   "
  163.  PRINT "file should be placed in the same directory as your BBS.  You can  "
  164.  PRINT "see these instructions anytime by simply typing in  OPENDOOR without"
  165.  PRINT "any command line input.                                            "
  166.  PRINT "                                                                   "
  167.  PRINT "This release of  OPENDOOR will support Local operation and/or input "
  168.  PRINT "from RBBS with (DORINFO1.DEF); and TAG or PCBOARD with (PCBOARD.SYS)."
  169.  PRINT
  170.  CALL HitKey
  171.  
  172.  CLS
  173.  PRINT " OPENDOOR.EXE ... Command Line Input"
  174.  PRINT
  175.  PRINT "  This Program requires input on the Command Line"
  176.  PRINT "    The first argument is the full name and location of"
  177.  PRINT "    the ansi graphics door to be run and it is required."
  178.  PRINT "    The second argument is optional and signals that you"
  179.  PRINT "    wish to run the door in local mode."
  180.  PRINT
  181.  PRINT "  For Example:"
  182.  PRINT "      OPENDOOR.EXE D:\Tag\Games\Maze.EXE"
  183.  PRINT "      OPENDOOR.EXE D:\RBBS\DOORS\BJACK.EXE LOCAL"
  184.  PRINT
  185.  CALL HitKey
  186.  
  187.  CLS
  188.  PRINT " OPENDOOR.EXE ...  OPENDOOR.DEF Input"
  189.  PRINT
  190.  PRINT "  Note: Both  OPENDOOR.EXE and  OPENDOOR.DEF should be in the"
  191.  PRINT "        same directory as your BBS and this should be the"
  192.  PRINT "        current directory!"
  193.  PRINT
  194.  PRINT "   OPENDOOR.DEF Format:      <= Text File"
  195.  PRINT "    BBS Name                <= Line 1"
  196.  PRINT "    Sysop's First Name      <= Line 2"
  197.  PRINT "    Sysop's Last Name       <= Line 3"
  198.  PRINT "    Port                    <= Line 4"
  199.  PRINT "    BBS Info for Doors      <= Line 5"
  200.  PRINT "    Max. Door Time          <= Line 6 (Minutes)"
  201.  PRINT "    DebugSwitch             <= Line 7 (ON or OFF)"
  202.  PRINT
  203.  PRINT "  Line 4 Options: COM1: or COM2: or COM3: or COM4: or LOCAL"
  204.  PRINT "  Line 5 Options: DORINFO1.DEF or PCBOARD.SYS or LOCAL"
  205.  PRINT
  206.  CALL HitKey
  207.  
  208.  CLS
  209.  PRINT " OPENDOOR.EXE ... Local Mode Operation"
  210.  PRINT
  211.  PRINT "  Use of LOCAL on the command line will force door to run in"
  212.  PRINT "  local mode.  LOCAL in either line 4 or line 5 of the file"
  213.  PRINT "   OPENDOOR.DEF will also force Local operation."
  214.  PRINT
  215.  PRINT "  Some BBS systems also allow the BBS to execute doors directly"
  216.  PRINT "  in local mode.  PcBoard and TAG support this mode of operation"
  217.  PRINT "  and this situation is reflected in the information passed to"
  218.  PRINT "  the door in the file PCBOARD.SYS  "
  219.  PRINT
  220.  CALL HitKey
  221.  
  222.  CLS
  223.  PRINT " OPENDOOR.EXE ... Output ( OPENDOOR.SYS)"
  224.  PRINT
  225.  PRINT "  Output from this program is put in a file named  OPENDOOR.SYS"
  226.  PRINT "  This file in placed in the same directory where the door is"
  227.  PRINT "  located.  This is a simple text file with the following format."
  228.  PRINT
  229.  PRINT " OPENDOOR.SYS ... Format/Example"
  230.  PRINT
  231.  PRINT "The Tool Box        <= Line #1 ... BBS Name"
  232.  PRINT "Fast                <= Line #2 ... Sysop's First Name"
  233.  PRINT "Fingers             <= Line #3 ... Sysop's Last Name"
  234.  PRINT "COM1: 2400,N,8,1    <= Line #4 ... Open Modem Info"
  235.  PRINT "Joe                 <= Line #5 ... User's First Name"
  236.  PRINT "Smith               <= Line #6 ... User's Last Name"
  237.  PRINT "60                  <= Line #7 ... Minutes Allowed in Door "
  238.  PRINT "OFF                 <= Line #8 ... Debug ON or OFF"
  239.  PRINT
  240.  CALL HitKey
  241.  
  242.  CLS
  243.  PRINT " OPENDOOR.EXE ... Support for Other BBS Systems"
  244.  PRINT
  245.  PRINT "  Over time I suppect logic will be added for a growing list of"
  246.  PRINT "  BBS systems.  However, in the hope of allowing you to bring up"
  247.  PRINT "  an unsupported system I have encluded a copy of the Quick Basic"
  248.  PRINT "  Release 4.0 source code.  The code is quite structured and really"
  249.  PRINT "  requires only one subroutine be added to support each new BBS."
  250.  PRINT
  251.  PRINT "  The trick of course is understanding how to locate and read the"
  252.  PRINT "  information your bbs has about the current attached user.  The"
  253.  PRINT "  information required is:"
  254.  PRINT "    The user's name, the baud rate, the connection word length and"
  255.  PRINT "    stop bits, and the pariety of the connection.  You will also"
  256.  PRINT "    need to know if the callers terminal program will support"
  257.  PRINT "    ansi graphics."
  258.  PRINT
  259.  PRINT "  Good luck with the Ansi (Moving Graphics) Doors, Enjoy ..."
  260.  PRINT
  261.  PRINT "                                     Fast Fingers ..."
  262.  PRINT "                                     313-247-0094"
  263.  PRINT
  264.  CALL HitKey
  265.  
  266.  END
  267.  
  268. END SUB
  269.  
  270. SUB HitKey
  271.  
  272.     PRINT "                 => Hit Any Key to Continue <="
  273.     A$ = ""
  274. WaitKey:
  275.     A$ = INKEY$
  276.     IF A$ = "" THEN GOTO WaitKey
  277.    
  278. END SUB
  279.  
  280. SUB PcBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag)
  281.     
  282.      DIM RecPtr AS PcBoardRecord
  283.  
  284.      REM Default Output Values
  285.     
  286.      OkFlag = 1
  287.      FirstName$ = "Fast"
  288.      LastName$ = "Fingers"
  289.      UTime$ = "0"
  290.      HookUp$ = "LOCAL"
  291.     
  292. '
  293. '    Logic for Reading PcBoard.Sys Door Data
  294. '
  295.      IF UCASE$(BBS$) <> "PCBOARD.SYS" THEN
  296.        OkFlag = 0
  297.        EXIT SUB
  298.      END IF
  299.  
  300.      CALL FindFile(BBS$, FindSW)
  301.      IF FindSW = 0 THEN
  302.        PRINT "The PcBoard BBS logic could not find the file => " + BBS$
  303.        CALL Delay(2)
  304.        OkFlag = 0
  305.        EXIT SUB
  306.      END IF
  307.  
  308.      FileNo = FREEFILE
  309.      OPEN BBS$ FOR RANDOM AS #FileNo LEN = 129
  310.        GET #FileNo, 1, RecPtr
  311.        Baud$ = LTRIM$(RTRIM$(RecPtr.PcBaud))
  312.        FullName$ = LTRIM$(RTRIM$(RecPtr.PcName))
  313.        FirstName$ = LTRIM$(RTRIM$(RecPtr.PcFirstName))
  314.        GraphicsSW$ = LTRIM$(RTRIM$(RecPtr.PcGraphicsSw))
  315.      CLOSE #FileNo
  316.  
  317.      IF Baud$ = "LOCA" THEN
  318.        HookUp$ = "LOCAL"
  319.      ELSE
  320.        IF GraphicsSW$ = "-1" THEN
  321.          HookUp$ = Baud$ + ",N,8,1"
  322.        ELSE
  323.          OkFlag = 0: REM Not an Ansi Graphics User
  324.          EXIT SUB
  325.        END IF
  326.      END IF
  327.     
  328.      LenFName = LEN(FirstName$)
  329.      LenFullName = LEN(FullName$)
  330.      IF LenFName + 2 >= LenFullName THEN
  331.        LastName$ = FirstName$
  332.        FirstName$ = "Mr"
  333.      ELSE
  334.        LastName$ = MID$(FullName$, LenFName + 2, LenFullName - LenFName - 1)
  335.      END IF
  336.      CALL Filter(FirstName$)
  337.      CALL Filter(LastName$)
  338.     
  339.      PRINT "BBS Door File Analysis for => PCBOARD.SYS"
  340.      PRINT "  Hookup ....... "; HookUp$
  341.      PRINT "  First Name ... "; FirstName$
  342.      PRINT "  Last Name .... "; LastName$
  343. '    PRINT "  PcGraphicsSw . "; GraphicsSW$
  344.  
  345.      EXIT SUB
  346. '
  347. END SUB
  348.  
  349. SUB RBBSBoard (BBS$, FirstName$, LastName$, UTime$, HookUp$, OkFlag)
  350.  
  351.      REM Default Output Values
  352.    
  353.      OkFlag = 1
  354.      FirstName$ = "Fast"
  355.      LastName$ = "Fingers"
  356.      UTime$ = "0"
  357.      HookUp$ = "LOCAL"
  358.  
  359. '    REM legal OUTPUT format expected  "2400,N,8,1" <= HookUp$ .. sub output
  360. '    REM legal INPUT  format expected  "2400 BAUD,8,N,1" <= Baud$ .. dorinfo1
  361.  
  362. '
  363. '    Logic for Reading DorInfo1.Def Door Data
  364. '
  365.      IF UCASE$(BBS$) <> "DORINFO1.DEF" THEN
  366.        BBS$ = "DORINFO" + %1 + ".DEF"                   'MITCHELL MOD
  367.        PRINT "BBS$ VARIABLE CHANGED TO...",BBS$         'MITCHELL MOD
  368. '      OkFlag = 0
  369.        EXIT SUB
  370.      END IF
  371.  
  372.      CALL FindFile(BBS$, FindSW)
  373.      PRINT "SEARCHING FOR...",BBS$                     'MITCHELL MOD
  374.      IF FindSW = 0 THEN
  375.        PRINT "The DorInfo1.Def BBS logic could not find the file => " + BBS$
  376.        CALL Delay(2)
  377.        OkFlag = 0
  378.        EXIT SUB
  379.      END IF
  380.  
  381.      FileNo = FREEFILE
  382.      OPEN BBS$ FOR INPUT AS #FileNo
  383.        LINE INPUT #FileNo, BBSName$
  384.        LINE INPUT #FileNo, SysopFirstName$
  385.        LINE INPUT #FileNo, SysopLastName$
  386.        LINE INPUT #FileNo, ComPort$
  387.        LINE INPUT #FileNo, Baud$
  388.        LINE INPUT #FileNo, Switch1$
  389.        LINE INPUT #FileNo, FirstName$
  390.        LINE INPUT #FileNo, LastName$
  391.        LINE INPUT #FileNo, Address$
  392.        LINE INPUT #FileNo, Switch2$
  393.        LINE INPUT #FileNo, SecurityLevel$
  394.        LINE INPUT #FileNo, UTime$
  395.  
  396.        GraphicsSW$ = "?": REM  fix later ********************************
  397.  
  398.      CLOSE #FileNo
  399.  
  400.      FullName$ = FirstName$ + " " + LastName$
  401.      LenFName = LEN(FirstName$)
  402.      LenFullName = LEN(FullName$)
  403.      IF LenFName + 2 >= LenFullName THEN
  404.        LastName$ = FirstName$
  405.        FirstName$ = "Mr"
  406.      END IF
  407.      CALL Filter(FirstName$)
  408.      CALL Filter(LastName$)
  409.     
  410.      x = INSTR(1, ComPort$, "0")
  411.      IF x THEN
  412.        HookUp$ = "LOCAL"
  413.        GOTO QuitRbbsBoard
  414.      END IF
  415.  
  416.      x = INSTR(1, Baud$, "LOC")
  417.     
  418.      IF x > 0 THEN
  419.        HookUp$ = "LOCAL"
  420.      ELSE
  421.        x = LEN(Baud$)
  422.        x1 = INSTR(1, Baud$, " BAUD")
  423.        x2 = INSTR(1, Baud$, ",")
  424.        IF x1 = 0 OR x2 = 0 OR x1 > (x2 - 1) THEN
  425.          OkFlag = 0
  426.          PRINT "confused with first line of dorinfo1.def .. bad format"
  427.          EXIT SUB
  428.        ELSE
  429.          A$ = MID$(Baud$, 1, x1 - 1)
  430.          B$ = MID$(Baud$, x2, x - x2 + 1)
  431.          HookUp$ = A$ + B$
  432.          x1 = INSTR(1, HookUp$, "N")
  433.          x2 = INSTR(1, HookUp$, "8")
  434.          x3 = INSTR(1, HookUp$, "1")
  435.          IF x1 < 1 OR x2 < 1 OR x3 < 1 THEN
  436.            OkFlag = 0
  437.            PRINT "Not Graphics User based upon PARITY, DATA/STOP BITS"
  438.            EXIT SUB
  439.          END IF
  440.        END IF
  441.      END IF
  442.   
  443. QuitRbbsBoard:
  444.  
  445.      PRINT "BBS Door File Analysis for => DORINFO1.DEF"
  446.      PRINT "  Hookup ....... "; HookUp$
  447.      PRINT "  First Name ... "; FirstName$
  448.      PRINT "  Last Name .... "; LastName$
  449. '    PRINT "  PcGraphicsSw . "; GraphicsSW$
  450.  
  451.      EXIT SUB
  452. '
  453.  
  454.  
  455. END SUB
  456.  
  457. SUB ReadCommandLine (Command1$, Command2$, Drive$, Path$, Code$)
  458. '
  459. '    Logic for Local Mode Command input to  OPENDOOR.BAS
  460. '
  461.      Temp$ = UCASE$(COMMAND$)
  462.    
  463.      IF LEN(Temp$) < 1 THEN CALL HelpUser
  464. '
  465. '    Initilize OUTPUT to Defaults
  466. '
  467.      Command1$ = ""
  468.      Command2$ = ""
  469.      Drive$ = "C:"
  470.      Path$ = "C:\TAG"
  471.      Code$ = "Dummy.EXE"
  472. '
  473. '    Strip out first Command
  474. '
  475.      FOR i = 1 TO LEN(Temp$)
  476.        A$ = MID$(Temp$, i, 1)
  477.        IF A$ = " " THEN
  478.          IF (i + 1) > LEN(Temp$) THEN Command2$ = "LOCAL"
  479.          GOTO Lab1:
  480.        END IF
  481.        Command1$ = Command1$ + A$
  482.      NEXT i
  483.  
  484. Lab1:         
  485.      CALL FindFile(Command1$, FindSW)
  486.      IF FindSW = 0 THEN
  487.        PRINT "   OPENDOOR could not find => " + Command1$
  488.        PRINT "  Program Aborting Door Execution"
  489.        END
  490.      END IF
  491. '
  492. '    Strip out Path from Command1
  493. '
  494.      Path$ = Command1$
  495. Loop1:
  496.      x = LEN(Path$)
  497.      IF x < 2 THEN
  498.        PRINT "   OPENDOOR could not understand the path for the door"
  499.        PRINT "  Program Aborting Door Execution"
  500.        END
  501.      END IF
  502.      A$ = MID$(Path$, x, 1)
  503.      Path$ = MID$(Path$, 1, x - 1)
  504.      IF A$ <> "\" THEN GOTO Loop1
  505.     
  506.      Drive$ = UCASE$(MID$(Path$, 1, 2))
  507.      IF MID$(Drive$, 2, 1) <> ":" THEN Drive$ = "C:"
  508.      Code$ = MID$(Command1$, x + 1, LEN(Command1$) - x)
  509.     
  510.      PRINT "Command Line Analysis"
  511.      PRINT "  Command #1 ..... => "; Command1$
  512.      PRINT "  Command #2 ..... => "; Command2$
  513.      PRINT "  The Door is Program ................. => "; Code$
  514.      PRINT "  The Door is on Drive ................ => "; Drive$
  515.      PRINT "  The Door is located in Directory .... => "; Path$
  516.     
  517. END SUB
  518.  
  519. SUB ReadDEF (BBSName$, SysopFName$, SysopLName$, Port$, BBS$, MaxTime$, Debug$)
  520.     
  521.      PRINT "Reading file ...  OPENDOOR.Def"
  522.      CALL FindFile("OPENDOOR.Def", FindSW)
  523.      IF FindSW = 0 THEN
  524.        BEEP
  525.        PRINT "  OPENDOOR could not find file =>  OPENDOOR.DEF"
  526.        PRINT "  Note: Both  OPENDOOR.EXE and  OPENDOOR.DEF should be in the"
  527.        PRINT "        same directory as your BBS and this should be the"
  528.        PRINT "        current directory!"
  529.        PRINT
  530.        PRINT "  OPENDOOR.DEF Format:      <= Text File"
  531.        PRINT "    BBS Name                <= Line 1"
  532.        PRINT "    Sysop's First Name      <= Line 2"
  533.        PRINT "    Sysop's Last Name       <= Line 3"
  534.        PRINT "    Port                    <= Line 4"
  535.        PRINT "    BBS Output to Doors     <= Line 5"
  536.        PRINT "    Maximum Time in door    <= Line 6 (Minutes)"
  537.        PRINT "    DebugSwitch             <= Line 7 (ON or OFF)"
  538.        PRINT
  539.        PRINT "  Line 4 Options: COM1: or COM2: or COM3: or COM4: or LOCAL"
  540.        PRINT "  Line 5 Options: DORINFO1.DEF or PCBOARD.SYS or LOCAL"
  541.        PRINT
  542.        PRINT "  Program Aborting Door Execution"
  543.        CALL Delay(5)
  544.        PRINT
  545.        END
  546.      END IF
  547.    
  548.      FileId = FREEFILE
  549.  
  550.      OPEN "OPENDOOR.def" FOR INPUT AS #FileId
  551.       
  552.        INPUT #FileId, BBSName$
  553.        PRINT "  BBSName$ ................. "; BBSName$
  554.       
  555.        INPUT #FileId, SysopFName$
  556.        CALL Filter(SysopFName$)
  557.        PRINT "  Sysop's First Name ....... "; SysopFName$
  558.       
  559.        INPUT #FileId, SysopLName$
  560.        CALL Filter(SysopLName$)
  561.        PRINT "  Sysop's Last Name ........ "; SysopLName$
  562.       
  563.        INPUT #FileId, Port$
  564.        Port$ = RTRIM$(LTRIM$(UCASE$(Port$)))
  565.        IF Port$ = "COM1:" THEN GOTO OkPort
  566.        IF Port$ = "COM2:" THEN GOTO OkPort
  567.        IF Port$ = "COM3:" THEN GOTO OkPort
  568.        IF Port$ = "COM4:" THEN GOTO OkPort
  569.        IF Port$ = "LOCAL" THEN GOTO OkPort
  570.        PRINT
  571.        PRINT "   OPENDOOR.DEF Format:      <= Text File"
  572.        PRINT "    BBS Name                <= Line 1"
  573.        PRINT "    Sysop's First Name      <= Line 2"
  574.        PRINT "    Sysop's Last Name       <= Line 3"
  575.        PRINT "    Port                    <= Line 4"
  576.        PRINT "    BBS Output to Doors     <= Line 5"
  577.        PRINT "    Max Door Time (Minutes) <= Line 6"
  578.        PRINT
  579.        PRINT "  Line 4 Options: COM1: or COM2: or COM3: or COM4: or LOCAL"
  580.        PRINT "  Line 5 Options: DORINFO1.DEF or PCBOARD.SYS or LOCAL"
  581.        PRINT
  582.        PRINT "  Program Aborting Door Execution because LINE 4 is BAD"
  583.        CALL Delay(5)
  584.        PRINT
  585.        END
  586. OkPort:
  587.        PRINT "  Com Port Used by Doors ... "; Port$
  588.       
  589.        INPUT #FileId, BBS$
  590.        BBS$ = UCASE$(BBS$)
  591.        PRINT "  Type of BBS Door Output .. "; BBS$
  592.       
  593.        INPUT #FileId, MaxTime$
  594.        PRINT "  Max. Minutes in Door ..... "; MaxTime$
  595.  
  596.        INPUT #FileId, Debug$
  597.        Debug$ = UCASE$(Debug$)
  598.        IF Debug$ <> "ON" THEN Debug$ = "OFF"
  599.        PRINT "  Debug Switch ............. "; Debug$
  600.       
  601.      CLOSE #FileId
  602.      
  603. END SUB
  604.  
  605.